For example, the main memory of a computer includes one or plural memory modules such as a Dual Inline Memory Module (DIMM), and one memory module includes one or plural Ranks, each of which is a unit for inputting or outputting data. A Rank is also a unit of power control.
When a specific Rank is not accessed within a predetermined amount of time, for example, a memory access controller (MAC) that is connected to a central processing unit (CPU) carries out control to switch the operating mode of the specific Rank to an energy-saving mode.
For example, a case where a central processing unit (CPU) executes two threads A and B of one program at the same time is assumed. In such a case, as schematically illustrated in FIG. 1, it is also assumed that data DataA for thread A and data DataB for thread B are stored in Rank0, and data DataB for thread B is stored in Rank1. It is further assumed that memory access of thread A occurs frequently at short intervals, and that memory access of thread B occurs at comparatively long intervals. As a result, because the frequency of accessing Rank1 is low, it becomes easy to switch to the energy-saving mode. Therefore, it is assumed that Rank1 is often in the energy-saving mode when thread B accesses the memory.
For example, when the operating mode of neither Rank is switched to the energy-saving mode, the execution times for thread A and thread B are assumed to be the same as illustrated in FIG. 2. However, when controlling the power such as switching to the energy-saving mode when the access frequency is low, there is a possibility, as illustrated in FIG. 3, that stalling due to accessing a Rank in the energy-saving mode occurs more often in thread B than in thread A. When stalling occurs often only in a specific thread, the execution time for the specific thread becomes longer, and thus the overall execution time becomes longer. In the example in FIG. 3, the execution time becomes longer by a time Td than the time in the case when there is no switching to the energy-saving mode. In the case where thread A waits for thread B in order to synchronize thread A with thread B, the execution time similarly becomes longer. As a result, even though power for the memory can be preserved, the amount of time that the central processing unit uses becomes longer, so there is a possibility that the overall amount of power consumed per unit time by the central processing unit will increase.
There exists a technique for managing power necessary for a device in the activated state or stopped state of a task with the objective of reducing unnecessary power consumption, as well as a technique for managing the number of memory blocks that were assigned, for each memory region, and stopping the supply of power when the number of assigned memory blocks reaches a threshold value (for example, 0). However, these techniques do not take into consideration problems such as described above.
In other words, there is no technique for suppressing unbalance of the execution times among plural threads generated from one program.